From: Florian Müllner Date: Mon, 24 Oct 2022 12:01:03 +0000 (+0200) Subject: dbusServices/screencast: Check for all require elements X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~435^2^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3cdcd075ef5320cf3946251470a71cc2ff4e09de;p=gnome-shell.git dbusServices/screencast: Check for all require elements Instead of assuming that gst-plugins-good has been compiled with all the plugins we need enabled, explicitly check for the ones we use. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5710 Part-of: --- diff --git a/js/dbusServices/screencast/screencastService.js b/js/dbusServices/screencast/screencastService.js index 7b47da27c..f7f36da88 100644 --- a/js/dbusServices/screencast/screencastService.js +++ b/js/dbusServices/screencast/screencastService.js @@ -259,9 +259,13 @@ var Recorder = class { var ScreencastService = class extends ServiceImplementation { static canScreencast() { + const elements = [ + 'pipewiresrc', + 'filesink', + ...DEFAULT_PIPELINE.split('!').map(e => e.trim().split(' ').at(0)), + ]; return Gst.init_check(null) && - Gst.ElementFactory.find('pipewiresrc') && - Gst.ElementFactory.find('filesink'); + elements.every(e => Gst.ElementFactory.find(e) != null); } constructor() {